$(function (){
    $.ajax({
        type:'GET',
        url:'/multipower/point/getAll',
        success:function (data) {
            if(data.status==1){
                $.each(data.data, function (index, item) {
                    // 下拉菜单里添加元素
                    $('#devPointId').append(new Option(item.pointName, item.id));
                    $('#batteryPointId').append(new Option(item.pointName, item.id));
                    $('#temperaturePointId').append(new Option(item.pointName, item.id));
                    $('#endFlagId').append(new Option(item.pointName, item.id));
                });
                //修改 searchableSelect.js 中方法名
                $('#devPointId').searchableSelect();
                $('#batteryPointId').searchableSelect1();
                $('#temperaturePointId').searchableSelect2();
                $('#endFlagId').searchableSelect3();
            }else{
                layer.alert(data.msg, {
                    icon: 5,
                    title: "提示"
                });
            }
        },
        failure:function (data) {
            layer.alert(data.msg, {
                icon: 5,
                title: "提示"
            });
        }
    })
})